<%@ page language="java" pageEncoding="UTF-8"%><%
	if(request.getAttribute("header")==null){
		request.setAttribute("header", '0');
	}
%>   <header><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
      <nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top shadow-lg">
         <a class="navbar-brand ml-2 p-0" href="./"><img title="${config.webName }" src="assets/img/logo.jpg" height="52" /></a>
         <button class="navbar-toggler mr-2" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
         </button>

         <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav mr-auto">
               <li class="nav-item ${requestScope.header=='0'?' active':'' }"><a class="nav-link" href="mall-list.let">网站首页</a></li>
               <li class="nav-item dropdown${requestScope.header=='1'?' active':'' }">
                  <a class="nav-link dropdown-toggle" href="p-2-1.htm">产品中心</a>
                  <div class="dropdown-menu" data-load="mall-type.let?&action=index&template=menu">
                  </div>
               </li>
               <li class="nav-item dropdown${requestScope.header=='2'?' active':'' }">
                  <a class="nav-link dropdown-toggle" href="news-1-1.htm">新闻中心</a>
                  <div class="dropdown-menu" data-load="news-type.let?id=100&action=index&template=menu">
                  </div>
               </li>
               <li class="nav-item dropdown${requestScope.header=='f'?' active':'' }">
                  <a class="nav-link dropdown-toggle" href="fiction.htm">文化频道</a>
               </li>
               <li class="nav-item${requestScope.header=='join'?' active':'' }"><a class="nav-link" href="page-join.htm">加入我们</a></li>
               <li class="nav-item${requestScope.header=='about'?' active':'' }"><a class="nav-link" href="page-about.htm">联系我们</a></li>
            </ul>
            <ul class="navbar-nav ml-auto mr-2 login">
               <c:if test="${empty sessionScope.user}">
               <li class="nav-item"><a class="nav-link" href="login.jsp">登录</a></li>
               <li class="nav-item"><a class="nav-link" href="reg.jsp">注册</a></li>
               </c:if>
               <c:if test="${not empty sessionScope.user}">
               <li class="nav-item dropdown">
                  <a class="nav-link dropdown-toggle" href="javascript:void(0);" data-toggle="dropdown"><img onerror="this.src='assets/img/head.jpg'" src="${sessionScope.user.userImg }" class="user-img"/> ${sessionScope.user.userNickname} </a>
                  <div class="dropdown-menu dropdown-menu-right">
                     <a class="dropdown-item" href="user/">个人中心</a>
                     <div class="dropdown-divider"></div>
                     <a class="dropdown-item _exit" href="javascript:void(0)">安全退出</a>
                  </div>
               </li>
               </c:if>
            </ul>
         </div>
      </nav>
      <a title="购物车" class="shopping-cart" href="mall-cart.let">
        <i class="fa fa-shopping-cart"></i>
      </a>
   </header>